﻿#pragma once
#include "CoreMinimal.h"
#include "SmStepObjectTypes.generated.h"

UENUM(BlueprintType)
namespace ESmStepObjectState
{
	enum Type
	{
		StepStart,
		StepInProcess,
		StepEnd,
		DefaultNone = -1,
	};
}

UENUM(BlueprintType)
namespace ESmStepObjectReplicationPolicy
{
	/** How an ability replicates state/events to everyone on the network */
	enum Type
	{
		// We don't replicate the instance of the ability to anyone.
		ReplicateNo			UMETA(DisplayName = "Do Not Replicate"),

		// We replicate the instance of the ability to the owner.
		ReplicateYes		UMETA(DisplayName = "Replicate"),
	};
}

class USmQuestComponent;

// 仿照GA的ActorInfo，记录使用该SmStepObject的Component以及拥有该Component的Actor信息
USTRUCT(BlueprintType, Blueprintable)
struct SMQUEST_API FSmStepObjectActorInfo
{
	GENERATED_BODY()
	virtual ~FSmStepObjectActorInfo() {}
	
public:
	UPROPERTY(BlueprintReadOnly, Category = "ActorInfo")
	TWeakObjectPtr<AActor> OwnerActor;

	UPROPERTY(BlueprintReadOnly, Category = "ActorInfo")
	TWeakObjectPtr<AActor> AvatarActor;

	UPROPERTY(BlueprintReadOnly, Category = "ActorInfo")
	TWeakObjectPtr<USmQuestComponent> SmQuestComponent;

	/** Initializes the info from an owning actor. Will set both owner and avatar */
	virtual void InitFromActor(AActor* OwnerActor, AActor* AvatarActor, USmQuestComponent* InSmQuestComponent);

	
};


